<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE ImplicitParams #-}</span><span>
</span><span id="line-4"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Compat.Stack</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-5"></span><span>    </span><span class="annot"><a href="Distribution.Compat.Stack.html#WithCallStack"><span class="hs-identifier">WithCallStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Stack.Types.html#CallStack"><span class="hs-identifier">CallStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>    </span><span class="annot"><a href="Distribution.Compat.Stack.html#annotateCallStackIO"><span class="hs-identifier">annotateCallStackIO</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Stack.html#withFrozenCallStack"><span class="hs-identifier">withFrozenCallStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>    </span><span class="annot"><a href="Distribution.Compat.Stack.html#withLexicalCallStack"><span class="hs-identifier">withLexicalCallStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Stack.html#callStack"><span class="hs-identifier">callStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Exception.html#prettyCallStack"><span class="hs-identifier">prettyCallStack</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>    </span><span class="annot"><a href="Distribution.Compat.Stack.html#parentSrcLocPrefix"><span class="hs-identifier">parentSrcLocPrefix</span></a></span><span>
</span><span id="line-13"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.Error.html#"><span class="hs-identifier">System.IO.Error</span></a></span><span class="hs-cpp">

#ifdef MIN_VERSION_base
</span><span class="hs-cpp">#if MIN_VERSION_base(4,8,1)
</span><span class="hs-cpp">#define GHC_STACK_SUPPORTED 1
</span><span class="hs-cpp">#endif
</span><span class="hs-cpp">#endif
</span><span class="hs-cpp">
#ifdef GHC_STACK_SUPPORTED
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Stack.html#"><span class="hs-identifier">GHC.Stack</span></a></span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#ifdef GHC_STACK_SUPPORTED
</span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span class="hs-keyword">type</span><span> </span><span id="WithCallStack"><span class="annot"><a href="Distribution.Compat.Stack.html#WithCallStack"><span class="hs-identifier hs-var">WithCallStack</span></a></span></span><span> </span><span id="local-6989586621679612528"><span class="annot"><a href="#local-6989586621679612528"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../base/src/GHC.Stack.Types.html#HasCallStack"><span class="hs-identifier hs-type">HasCallStack</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679612528"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-cpp">
#elif MIN_VERSION_base(4,8,1)
</span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">WithCallStack</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="">?callStack</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">CallStack</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-identifier">a</span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#if !MIN_VERSION_base(4,9,0)
</span><span class="hs-comment">-- NB: Can't say WithCallStack (WithCallStack a -&gt; a);</span><span>
</span><span id="line-37"></span><span class="hs-comment">-- Haskell doesn't support this kind of implicit parameter!</span><span>
</span><span id="line-38"></span><span class="hs-comment">-- See https://mail.haskell.org/pipermail/ghc-devs/2016-January/011096.html</span><span>
</span><span id="line-39"></span><span class="hs-comment">-- Since this function doesn't do anything, it's OK to</span><span>
</span><span id="line-40"></span><span class="hs-comment">-- give it a less good type.</span><span>
</span><span id="line-41"></span><span class="hs-identifier">withFrozenCallStack</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">WithCallStack</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">a</span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span class="hs-identifier">withFrozenCallStack</span><span> </span><span class="hs-identifier">x</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">x</span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-identifier">callStack</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="">?callStack</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">CallStack</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-identifier">CallStack</span><span>
</span><span id="line-45"></span><span class="hs-identifier">callStack</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="">?callStack</span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-identifier">prettyCallStack</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">CallStack</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">String</span><span>
</span><span id="line-48"></span><span class="hs-identifier">prettyCallStack</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">showCallStack</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- | Give the *parent* of the person who invoked this;</span><span>
</span><span id="line-52"></span><span class="hs-comment">-- so it's most suitable for being called from a utility function.</span><span>
</span><span id="line-53"></span><span class="hs-comment">-- You probably want to call this using 'withFrozenCallStack'; otherwise</span><span>
</span><span id="line-54"></span><span class="hs-comment">-- it's not very useful.  We didn't implement this for base-4.8.1</span><span>
</span><span id="line-55"></span><span class="hs-comment">-- because we cannot rely on freezing to have taken place.</span><span>
</span><span id="line-56"></span><span class="hs-comment">--</span><span>
</span><span id="line-57"></span><span class="annot"><a href="Distribution.Compat.Stack.html#parentSrcLocPrefix"><span class="hs-identifier hs-type">parentSrcLocPrefix</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.Stack.html#WithCallStack"><span class="hs-identifier hs-type">WithCallStack</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-cpp">
#if MIN_VERSION_base(4,9,0)
</span><span id="parentSrcLocPrefix"><span class="annot"><span class="annottext">parentSrcLocPrefix :: WithCallStack String
</span><a href="Distribution.Compat.Stack.html#parentSrcLocPrefix"><span class="hs-identifier hs-var hs-var">parentSrcLocPrefix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-60"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CallStack -&gt; [(String, SrcLoc)]
</span><a href="../../base/src/GHC.Stack.Types.html#getCallStack"><span class="hs-identifier hs-var">getCallStack</span></a></span><span> </span><span class="annot"><span class="annottext">CallStack
HasCallStack =&gt; CallStack
</span><a href="../../base/src/GHC.Stack.html#callStack"><span class="hs-identifier hs-var">callStack</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-61"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(String, SrcLoc)
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679612521"><span class="annot"><span class="annottext">SrcLoc
</span><a href="#local-6989586621679612521"><span class="hs-identifier hs-var">loc</span></a></span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[(String, SrcLoc)]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcLoc -&gt; String
</span><a href="#local-6989586621679612520"><span class="hs-identifier hs-var">showLoc</span></a></span><span> </span><span class="annot"><span class="annottext">SrcLoc
</span><a href="#local-6989586621679612521"><span class="hs-identifier hs-var">loc</span></a></span><span>
</span><span id="line-62"></span><span>    </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679612519"><span class="annot"><span class="annottext">SrcLoc
</span><a href="#local-6989586621679612519"><span class="hs-identifier hs-var">loc</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SrcLoc -&gt; String
</span><a href="#local-6989586621679612520"><span class="hs-identifier hs-var">showLoc</span></a></span><span> </span><span class="annot"><span class="annottext">SrcLoc
</span><a href="#local-6989586621679612519"><span class="hs-identifier hs-var">loc</span></a></span><span>
</span><span id="line-63"></span><span>    </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;parentSrcLocPrefix: empty call stack&quot;</span></span><span>
</span><span id="line-64"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-65"></span><span>  </span><span id="local-6989586621679612520"><span class="annot"><span class="annottext">showLoc :: SrcLoc -&gt; String
</span><a href="#local-6989586621679612520"><span class="hs-identifier hs-var hs-var">showLoc</span></a></span></span><span> </span><span id="local-6989586621679612515"><span class="annot"><span class="annottext">SrcLoc
</span><a href="#local-6989586621679612515"><span class="hs-identifier hs-var">loc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-66"></span><span>    </span><span class="annot"><span class="annottext">SrcLoc -&gt; String
</span><a href="../../base/src/GHC.Stack.Types.html#srcLocFile"><span class="hs-identifier hs-var hs-var">srcLocFile</span></a></span><span> </span><span class="annot"><span class="annottext">SrcLoc
</span><a href="#local-6989586621679612515"><span class="hs-identifier hs-var">loc</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;:&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SrcLoc -&gt; Int
</span><a href="../../base/src/GHC.Stack.Types.html#srcLocStartLine"><span class="hs-identifier hs-var hs-var">srcLocStartLine</span></a></span><span> </span><span class="annot"><span class="annottext">SrcLoc
</span><a href="#local-6989586621679612515"><span class="hs-identifier hs-var">loc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span class="hs-cpp">
#else
</span><span class="hs-identifier">parentSrcLocPrefix</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-string">&quot;Call sites not available with base &lt; 4.9.0.0 (GHC 8.0): &quot;</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-71"></span><span class="hs-comment">-- Yeah, this uses skivvy implementation details.</span><span>
</span><span id="line-72"></span><span id="local-6989586621679612547"><span id="local-6989586621679612548"><span class="annot"><a href="Distribution.Compat.Stack.html#withLexicalCallStack"><span class="hs-identifier hs-type">withLexicalCallStack</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679612548"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compat.Stack.html#WithCallStack"><span class="hs-identifier hs-type">WithCallStack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679612547"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compat.Stack.html#WithCallStack"><span class="hs-identifier hs-type">WithCallStack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679612548"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679612547"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-73"></span><span id="withLexicalCallStack"><span class="annot"><span class="annottext">withLexicalCallStack :: forall a b.
(a -&gt; WithCallStack (IO b)) -&gt; WithCallStack (a -&gt; IO b)
</span><a href="Distribution.Compat.Stack.html#withLexicalCallStack"><span class="hs-identifier hs-var hs-var">withLexicalCallStack</span></a></span></span><span> </span><span id="local-6989586621679612510"><span class="annot"><span class="annottext">a -&gt; WithCallStack (IO b)
</span><a href="#local-6989586621679612510"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-74"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679612508"><span class="annot"><span class="annottext">stk :: CallStack
</span><a href="#local-6989586621679612508"><span class="hs-identifier hs-var hs-var">stk</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasCallStack
CallStack
</span><a href="#local-6989586621679612509"><span class="hs-var">?callStack</span></a></span><span>
</span><span id="line-75"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679612507"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679612507"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="">?callStack</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">HasCallStack
CallStack
</span><a href="#local-6989586621679612508"><span class="hs-identifier hs-var">stk</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">a -&gt; WithCallStack (IO b)
</span><a href="#local-6989586621679612510"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679612507"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-cpp">

#else
</span><span>
</span><span id="line-79"></span><span class="hs-keyword">data</span><span> </span><span class="hs-identifier">CallStack</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">CallStack</span><span>
</span><span id="line-80"></span><span>    </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">Eq</span><span class="hs-special">,</span><span> </span><span class="hs-identifier">Show</span><span class="hs-special">)</span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-keyword">type</span><span> </span><span class="hs-identifier">WithCallStack</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">a</span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="hs-identifier">withFrozenCallStack</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">a</span><span>
</span><span id="line-85"></span><span class="hs-identifier">withFrozenCallStack</span><span> </span><span class="hs-identifier">x</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">x</span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-identifier">callStack</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">CallStack</span><span>
</span><span id="line-88"></span><span class="hs-identifier">callStack</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">CallStack</span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-identifier">prettyCallStack</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">CallStack</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">String</span><span>
</span><span id="line-91"></span><span class="hs-identifier">prettyCallStack</span><span> </span><span class="hs-identifier">_</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-string">&quot;Call stacks not available with base &lt; 4.8.1.0 (GHC 7.10)&quot;</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="hs-identifier">parentSrcLocPrefix</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier">String</span><span>
</span><span id="line-94"></span><span class="hs-identifier">parentSrcLocPrefix</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-string">&quot;Call sites not available with base &lt; 4.9.0.0 (GHC 8.0): &quot;</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-identifier">withLexicalCallStack</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">b</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-identifier">IO</span><span> </span><span class="hs-identifier">b</span><span>
</span><span id="line-97"></span><span class="hs-identifier">withLexicalCallStack</span><span> </span><span class="hs-identifier">f</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">f</span><span class="hs-cpp">

#endif
</span><span>
</span><span id="line-101"></span><span class="hs-comment">-- | This function is for when you *really* want to add a call</span><span>
</span><span id="line-102"></span><span class="hs-comment">-- stack to raised IO, but you don't have a</span><span>
</span><span id="line-103"></span><span class="hs-comment">-- 'Distribution.Verbosity.Verbosity' so you can't use</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- 'Distribution.Simple.Utils.annotateIO'.  If you have a 'Verbosity',</span><span>
</span><span id="line-105"></span><span class="hs-comment">-- please use that function instead.</span><span>
</span><span id="line-106"></span><span id="local-6989586621679612544"><span class="annot"><a href="Distribution.Compat.Stack.html#annotateCallStackIO"><span class="hs-identifier hs-type">annotateCallStackIO</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.Stack.html#WithCallStack"><span class="hs-identifier hs-type">WithCallStack</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679612544"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621679612544"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-107"></span><span id="annotateCallStackIO"><span class="annot"><span class="annottext">annotateCallStackIO :: forall a. WithCallStack (IO a -&gt; IO a)
</span><a href="Distribution.Compat.Stack.html#annotateCallStackIO"><span class="hs-identifier hs-var hs-var">annotateCallStackIO</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(IOError -&gt; IOError) -&gt; IO a -&gt; IO a
forall a. (IOError -&gt; IOError) -&gt; IO a -&gt; IO a
</span><a href="../../base/src/System.IO.Error.html#modifyIOError"><span class="hs-identifier hs-var">modifyIOError</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; IOError
</span><a href="#local-6989586621679612501"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-108"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-109"></span><span>    </span><span id="local-6989586621679612501"><span class="annot"><span class="annottext">f :: IOError -&gt; IOError
</span><a href="#local-6989586621679612501"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679612500"><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679612500"><span class="hs-identifier hs-var">ioe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">IOError -&gt; String -&gt; IOError
</span><a href="../../base/src/System.IO.Error.html#ioeSetErrorString"><span class="hs-identifier hs-var">ioeSetErrorString</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679612500"><span class="hs-identifier hs-var">ioe</span></a></span><span>
</span><span id="line-110"></span><span>          </span><span class="annot"><span class="annottext">(String -&gt; IOError) -&gt; (String -&gt; String) -&gt; String -&gt; IOError
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679612497"><span class="hs-identifier hs-var">wrapCallStack</span></a></span><span>
</span><span id="line-111"></span><span>          </span><span class="annot"><span class="annottext">(String -&gt; IOError) -&gt; String -&gt; IOError
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">IOError -&gt; String
</span><a href="../../base/src/System.IO.Error.html#ioeGetErrorString"><span class="hs-identifier hs-var">ioeGetErrorString</span></a></span><span> </span><span class="annot"><span class="annottext">IOError
</span><a href="#local-6989586621679612500"><span class="hs-identifier hs-var">ioe</span></a></span><span>
</span><span id="line-112"></span><span>    </span><span id="local-6989586621679612497"><span class="annot"><span class="annottext">wrapCallStack :: String -&gt; String
</span><a href="#local-6989586621679612497"><span class="hs-identifier hs-var hs-var">wrapCallStack</span></a></span></span><span> </span><span id="local-6989586621679612493"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679612493"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-113"></span><span>        </span><span class="annot"><span class="annottext">CallStack -&gt; String
</span><a href="../../base/src/GHC.Exception.html#prettyCallStack"><span class="hs-identifier hs-var">prettyCallStack</span></a></span><span> </span><span class="annot"><span class="annottext">CallStack
HasCallStack =&gt; CallStack
</span><a href="../../base/src/GHC.Stack.html#callStack"><span class="hs-identifier hs-var">callStack</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679612493"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-114"></span></pre></body></html>